Program development lifecycle – the process of developing a program set out in five stages:
Waterfall model – a linear sequential program development cycle, in which each stage is completed before the next is begun
Iterative model – a type of program development cycle in which a simple subset of the requirements is developed, then expanded or enhanced, with the development cycle being repeated until the full system has been developed
Rapid application development (RAD) – a type of program development cycle in which different parts of the requirements are developed in parallel, using prototyping to provide early user involvement in testing
Structure chart – a modelling tool used to decompose a problem into a set of sub-tasks. It shows the hierarchy or structure of the different modules and how they connect and interact with each other
DECLARE radius : REAL
DECLARE answer : REAL
CONSTANT pi ← 3.142
FUNCTION calculateVolume (radius:real) RETURNS real
RETURN (4 / 3) * pi * radius * radius * radius
ENDFUNCTION
FUNCTION calculateSurfaceArea (radius:real) RETURNS real
RETURN 4 * pi * radius * radius
ENDFUNCTION
PROCEDURE inputRadius
OUTPUT "Please enter the radius of the sphere "
INPUT radius
WHILE radius < 0 DO
OUTPUT "Please enter a positive number "
INPUT radius
ENDWHILE
ENDPROCEDURE
PROCEDURE outputAnswer
OUTPUT answer
ENDPROCEDURE
CALL inputRadius
WHILE radius <> 0
OUTPUT "Do you want to calculate the Volume (V) or Surface Area (S)"
INPUT reply
IF reply = "V"
THEN
answer ← calculateVolume(radius)
OUTPUT "Volume "
ELSE
answer ← calculateSurfaceArea(radius)
OUTPUT "Surface Area "
ENDIF
CALL outputAnswer
CALL inputRadius
ENDWHILE
A finite state machine (FSM) is a mathematical model of a machine that can be in one of a fixed set of possible states. One state is changed to another by an external input, this is called a transition. A diagram showing the behaviour of an FSM is called a state-transition diagram.
Trace table – a table showing the process of dry- running a program with columns showing the values of each variable as it changes Run-time error – an error found in a program when it is executed; the program may halt unexpectedly